package main

import (
	"fmt"
	"strconv"
)

func main() {
	var a int8 = 20
	var b int16 = 10

	var c = int16(a) + b
	fmt.Printf("c %v type %T\n", c, c)

	strInt := fmt.Sprintf("%d", 2)
	fmt.Printf("%v type %T\n", strInt, strInt)

	strFloat := fmt.Sprintf("%.2f", 2.231)
	fmt.Printf("%v type %T\n", strFloat, strFloat)

	strBool := fmt.Sprintf("%t", false)
	fmt.Printf("%v type %T\n", strBool, strBool)

	strByte := fmt.Sprintf("%c", 'a')
	fmt.Printf("%v type %T\n", strByte, strByte)

	fmt.Println("----------------------------------------------")

	var i int64 = 39
	formatInt := strconv.FormatInt(i, 10)
	fmt.Printf("%v type %T\n", formatInt, formatInt)
	var f float64 = 39.333
	formatFloat := strconv.FormatFloat(f, 'f', 1, 64)
	fmt.Printf("%v type %T\n", formatFloat, formatFloat)
}
